package com.deer.wms.system.manage.model.resource;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.util.Date;

/**
 * @author wei
 */
@Getter
@Setter
public class Resource {
    /**
     * 资源信息id
     */
    @Id
    @Column(name = "resource_id")
    @TableId(type = IdType.AUTO)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer resourceId;
    /**
     * 资源代码
     */
    @Column(name = "resource_code")
    private String resourceCode;
    /**
     * 资源名称
     */
    @Column(name = "resource_name")
    private String resourceName;
    /**
     * 父级资源信息id，一级资源为-1
     */
    @Column(name = "parent_id")
    private Integer parentId;
    /**
     * 资源类型：M=模块；F=功能；B=按钮；
     */
    @Column(name = "resource_type")
    private String resourceType;
    /**
     * 是否权限控制：0=否；1=是；默认是
     */
    private Boolean control;
    /**
     * 资源显示区域：L=左边部位；T=顶部；I=首页；默认L
     */
    private String region;
    /**
     * 层级
     */
    private Integer level;
    /**
     * 图标
     */
    private String icon;
    /**
     * 样式
     */
    private String style;
    /**
     * 排序号
     */
    @Column(name = "sort_number")
    private Integer sortNumber;
    /**
     * 信息状态：normal=正常的；invalid=无效的；deleted=已删除；默认正常的
     */
    private String state;
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private Date createTime;
    /**
     * 修改时间
     */
    @Column(name = "modify_time")
    private Date modifyTime;
    /**
     * 分组
     */
    private Integer resourceGroup;
}